// import React, { useState } from 'react'
// import { RouterProvider, createBrowserRouter } from 'react-router-dom'
// import router from './router/index'
// import { Button, ConfigProvider, Input, Space, theme as antdTeme } from "antd";
// function App() {
//   const [data,setData]=useState('light')
//   return (
//     <div>
//       <ConfigProvider
//         theme={{
//           // 1. 单独使用暗色算法
//           algorithm:
//             data === "bark"
//               ? antdTeme.darkAlgorithm
//               : antdTeme.compactAlgorithm,

//           // 2. 组合使用暗色算法与紧凑算法
//           // algorithm: [theme.darkAlgorithm, theme.compactAlgorithm],
//         }}
//       >
//         <Button
//           type="primary"
//           onClick={() => setData(data === "bark" ? "light" : "bark")}
//         >
//           {data === "bark" ? "黑" : "白"}
//         </Button>
//         <RouterProvider router={createBrowserRouter(router)}></RouterProvider>
//       </ConfigProvider>
//     </div>
//   );
// }

// export default App
import React, { useState } from "react";
import { RouterProvider, createBrowserRouter } from "react-router-dom";
import router from "./router/index";
import { Button, ConfigProvider, Input, Space, theme } from "antd";
function App() {

  return (
    <div>
    
        <RouterProvider router={createBrowserRouter(router)}></RouterProvider>
          
    </div>
  );
}

export default App;
